#include "protocol.h"

/*
void send_command(podcommand command, Socket* socket){
   socket->sendUnsignedInt((unsigned int) command);
}*/

/*podcommand receive_command(Socket* socket){
   return (podcommand) socket->receiveUnsignedInt();
}*/

//podcommand receive_command(SocketServer* server, SocketClient* client){
//   return (podcommand) server->receiveUnsignedInt(client);
//}

/* always sends to server
void send_movedata(movedata* data, Socket* socket){
   socket->sendUnsignedInt((unsigned int) data->x);
   socket->sendUnsignedInt((unsigned int) data->y);
   socket->sendUnsignedInt((unsigned int) data->z);
   socket->sendUnsignedInt((unsigned int) data->r);
   socket->sendUnsignedInt((unsigned int) data->p);
   socket->sendUnsignedInt((unsigned int) data->w);
}*/

/* always receiving from client
void receive_movedata(movedata* data, Socket* server, Socket* client){
   data->x = (float)server->receiveUnsignedInt(client);
   data->y = (float)server->receiveUnsignedInt(client);
   data->z = (float)server->receiveUnsignedInt(client);
   data->r = (float)server->receiveUnsignedInt(client);
   data->p = (float)server->receiveUnsignedInt(client);
   data->w = (float)server->receiveUnsignedInt(client);
}*/

/* always sending to client
void send_polldata(polldata* data, Socket* server, Socket* client){
   for(int i=0; i<NUM_INPUTS; i++)
      server->sendUnsignedInt(client, (unsigned int) data->inputs[i]);
}*/

/* always client receiving 
void receive_polldata(polldata* data, Socket* client){
   for(int i=0; i<NUM_INPUTS; i++)
      data->inputs[i] = client->receiveUnsignedInt();
}*/